
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module oauth2client.client</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="oauth2client.html"><font color="#ffffff">oauth2client</font></a>.client</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/google-api-python-client/oauth2client/client.py">/home/jcgregorio/projects/google-api-python-client/oauth2client/client.py</a></font></td></tr></table>
    <p><tt>An&nbsp;OAuth&nbsp;2.0&nbsp;client<br>
&nbsp;<br>
Tools&nbsp;for&nbsp;interacting&nbsp;with&nbsp;OAuth&nbsp;2.0&nbsp;protected<br>
resources.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br>
<a href="datetime.html">datetime</a><br>
</td><td width="25%" valign=top><a href="httplib2.html">httplib2</a><br>
<a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="simplejson.html">simplejson</a><br>
<a href="urllib.html">urllib</a><br>
</td><td width="25%" valign=top><a href="urlparse.html">urlparse</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#Credentials">Credentials</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#AccessTokenCredentials">AccessTokenCredentials</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#Flow">Flow</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#OAuth2WebServerFlow">OAuth2WebServerFlow</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#Storage">Storage</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#Error">Error</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#AccessTokenCredentialsError">AccessTokenCredentialsError</a>
</font></dt><dt><font face="helvetica, arial"><a href="oauth2client.client.html#AccessTokenRefreshError">AccessTokenRefreshError</a>
</font></dt><dt><font face="helvetica, arial"><a href="oauth2client.client.html#FlowExchangeError">FlowExchangeError</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="AccessTokenCredentials">class <strong>AccessTokenCredentials</strong></a>(<a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Credentials">Credentials</a>&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;for&nbsp;OAuth&nbsp;2.0<br>
&nbsp;<br>
<a href="#Credentials">Credentials</a>&nbsp;can&nbsp;be&nbsp;applied&nbsp;to&nbsp;an&nbsp;httplib2.Http&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;using&nbsp;the&nbsp;<a href="#AccessTokenCredentials-authorize">authorize</a>()<br>
method,&nbsp;which&nbsp;then&nbsp;signs&nbsp;each&nbsp;request&nbsp;from&nbsp;that&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;the&nbsp;OAuth&nbsp;2.0<br>
access&nbsp;token.&nbsp;&nbsp;This&nbsp;set&nbsp;of&nbsp;credentials&nbsp;is&nbsp;for&nbsp;the&nbsp;use&nbsp;case&nbsp;where&nbsp;you&nbsp;have<br>
acquired&nbsp;an&nbsp;OAuth&nbsp;2.0&nbsp;access_token&nbsp;from&nbsp;another&nbsp;place&nbsp;such&nbsp;as&nbsp;a&nbsp;JavaScript<br>
client&nbsp;or&nbsp;another&nbsp;web&nbsp;application,&nbsp;and&nbsp;wish&nbsp;to&nbsp;use&nbsp;it&nbsp;from&nbsp;Python.&nbsp;Because<br>
only&nbsp;the&nbsp;access_token&nbsp;is&nbsp;present&nbsp;it&nbsp;can&nbsp;not&nbsp;be&nbsp;refreshed&nbsp;and&nbsp;will&nbsp;in&nbsp;time<br>
expire.<br>
&nbsp;<br>
<a href="#AccessTokenCredentials">AccessTokenCredentials</a>&nbsp;objects&nbsp;may&nbsp;be&nbsp;safely&nbsp;pickled&nbsp;and&nbsp;unpickled.<br>
&nbsp;<br>
Usage:<br>
&nbsp;&nbsp;credentials&nbsp;=&nbsp;<a href="#AccessTokenCredentials">AccessTokenCredentials</a>('&lt;an&nbsp;access&nbsp;token&gt;',<br>
&nbsp;&nbsp;&nbsp;&nbsp;'my-user-agent/1.0')<br>
&nbsp;&nbsp;http&nbsp;=&nbsp;httplib2.Http()<br>
&nbsp;&nbsp;http&nbsp;=&nbsp;credentials.<a href="#AccessTokenCredentials-authorize">authorize</a>(http)<br>
&nbsp;<br>
Exceptions:<br>
&nbsp;&nbsp;AccessTokenCredentialsExpired:&nbsp;raised&nbsp;when&nbsp;the&nbsp;access_token&nbsp;expires&nbsp;or&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp;revoked.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#AccessTokenCredentials">AccessTokenCredentials</a></dd>
<dd><a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a></dd>
<dd><a href="oauth2client.client.html#Credentials">Credentials</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="AccessTokenCredentials-__init__"><strong>__init__</strong></a>(self, access_token, user_agent)</dt><dd><tt>Create&nbsp;an&nbsp;instance&nbsp;of&nbsp;<a href="#OAuth2Credentials">OAuth2Credentials</a><br>
&nbsp;<br>
This&nbsp;is&nbsp;one&nbsp;of&nbsp;the&nbsp;few&nbsp;types&nbsp;if&nbsp;<a href="#Credentials">Credentials</a>&nbsp;that&nbsp;you&nbsp;should&nbsp;contrust,<br>
<a href="#Credentials">Credentials</a>&nbsp;objects&nbsp;are&nbsp;usually&nbsp;instantiated&nbsp;by&nbsp;a&nbsp;<a href="#Flow">Flow</a>.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;access_token:&nbsp;string,&nbsp;access&nbsp;token.<br>
&nbsp;&nbsp;user_agent:&nbsp;string,&nbsp;The&nbsp;HTTP&nbsp;User-Agent&nbsp;to&nbsp;provide&nbsp;for&nbsp;this&nbsp;application.<br>
&nbsp;<br>
Notes:<br>
&nbsp;&nbsp;store:&nbsp;callable,&nbsp;a&nbsp;callable&nbsp;that&nbsp;when&nbsp;passed&nbsp;a&nbsp;Credential<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;store&nbsp;the&nbsp;credential&nbsp;back&nbsp;to&nbsp;where&nbsp;it&nbsp;came&nbsp;from.</tt></dd></dl>

<hr>
Methods inherited from <a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a>:<br>
<dl><dt><a name="AccessTokenCredentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim&nbsp;the&nbsp;state&nbsp;down&nbsp;to&nbsp;something&nbsp;that&nbsp;can&nbsp;be&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute&nbsp;the&nbsp;state&nbsp;of&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;from&nbsp;being&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Authorize&nbsp;an&nbsp;httplib2.Http&nbsp;instance&nbsp;with&nbsp;these&nbsp;credentials.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;http:&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;something&nbsp;that&nbsp;acts&nbsp;like&nbsp;it.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;A&nbsp;modified&nbsp;instance&nbsp;of&nbsp;http&nbsp;that&nbsp;was&nbsp;passed&nbsp;in.<br>
&nbsp;<br>
Example:<br>
&nbsp;<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;httplib2.Http()<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;credentials.<a href="#AccessTokenCredentials-authorize">authorize</a>(h)<br>
&nbsp;<br>
You&nbsp;can't&nbsp;create&nbsp;a&nbsp;new&nbsp;OAuth<br>
subclass&nbsp;of&nbsp;httplib2.Authenication&nbsp;because<br>
it&nbsp;never&nbsp;gets&nbsp;passed&nbsp;the&nbsp;absolute&nbsp;URI,&nbsp;which&nbsp;is<br>
needed&nbsp;for&nbsp;signing.&nbsp;So&nbsp;instead&nbsp;we&nbsp;have&nbsp;to&nbsp;overload<br>
'request'&nbsp;with&nbsp;a&nbsp;closure&nbsp;that&nbsp;adds&nbsp;in&nbsp;the<br>
Authorization&nbsp;header&nbsp;and&nbsp;then&nbsp;calls&nbsp;the&nbsp;original&nbsp;version<br>
of&nbsp;'request()'.</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set&nbsp;the&nbsp;storage&nbsp;for&nbsp;the&nbsp;credential.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;store:&nbsp;callable,&nbsp;a&nbsp;callable&nbsp;that&nbsp;when&nbsp;passed&nbsp;a&nbsp;Credential<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;store&nbsp;the&nbsp;credential&nbsp;back&nbsp;to&nbsp;where&nbsp;it&nbsp;came&nbsp;from.<br>
&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;needed&nbsp;to&nbsp;store&nbsp;the&nbsp;latest&nbsp;access_token&nbsp;if&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;expired&nbsp;and&nbsp;been&nbsp;refreshed.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a>:<br>
<dl><dt><strong>invalid</strong></dt>
<dd><tt>True&nbsp;if&nbsp;the&nbsp;credentials&nbsp;are&nbsp;invalid,&nbsp;such&nbsp;as&nbsp;being&nbsp;revoked.</tt></dd>
</dl>
<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Credentials">Credentials</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="AccessTokenCredentialsError">class <strong>AccessTokenCredentialsError</strong></a>(<a href="oauth2client.client.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Having&nbsp;only&nbsp;the&nbsp;access_token&nbsp;means&nbsp;no&nbsp;refresh&nbsp;is&nbsp;possible.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#AccessTokenCredentialsError">AccessTokenCredentialsError</a></dd>
<dd><a href="oauth2client.client.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="AccessTokenCredentialsError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#AccessTokenCredentialsError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="AccessTokenCredentialsError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="AccessTokenCredentialsError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="AccessTokenCredentialsError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenCredentialsError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="AccessTokenCredentialsError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="AccessTokenRefreshError">class <strong>AccessTokenRefreshError</strong></a>(<a href="oauth2client.client.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Error">Error</a>&nbsp;trying&nbsp;to&nbsp;refresh&nbsp;an&nbsp;expired&nbsp;access&nbsp;token.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#AccessTokenRefreshError">AccessTokenRefreshError</a></dd>
<dd><a href="oauth2client.client.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="AccessTokenRefreshError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#AccessTokenRefreshError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="AccessTokenRefreshError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="AccessTokenRefreshError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="AccessTokenRefreshError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#AccessTokenRefreshError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="AccessTokenRefreshError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Credentials">class <strong>Credentials</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Credentials">Credentials</a>&nbsp;objects.<br>
&nbsp;<br>
Subclasses&nbsp;must&nbsp;define&nbsp;an&nbsp;<a href="#Credentials-authorize">authorize</a>()&nbsp;method<br>
that&nbsp;applies&nbsp;the&nbsp;credentials&nbsp;to&nbsp;an&nbsp;HTTP&nbsp;transport.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Take&nbsp;an&nbsp;httplib2.Http&nbsp;instance&nbsp;(or&nbsp;equivalent)&nbsp;and<br>
authorizes&nbsp;it&nbsp;for&nbsp;the&nbsp;set&nbsp;of&nbsp;credentials,&nbsp;usually&nbsp;by<br>
replacing&nbsp;http.request()&nbsp;with&nbsp;a&nbsp;method&nbsp;that&nbsp;adds&nbsp;in<br>
the&nbsp;appropriate&nbsp;headers&nbsp;and&nbsp;then&nbsp;delegates&nbsp;to&nbsp;the&nbsp;original<br>
Http.request()&nbsp;method.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;error&nbsp;for&nbsp;this&nbsp;module.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Flow">class <strong>Flow</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Flow">Flow</a>&nbsp;objects.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FlowExchangeError">class <strong>FlowExchangeError</strong></a>(<a href="oauth2client.client.html#Error">Error</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Error">Error</a>&nbsp;trying&nbsp;to&nbsp;exchange&nbsp;an&nbsp;authorization&nbsp;grant&nbsp;for&nbsp;an&nbsp;access&nbsp;token.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#FlowExchangeError">FlowExchangeError</a></dd>
<dd><a href="oauth2client.client.html#Error">Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Error">Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="FlowExchangeError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#FlowExchangeError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="FlowExchangeError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="FlowExchangeError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="FlowExchangeError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#FlowExchangeError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="FlowExchangeError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="OAuth2Credentials">class <strong>OAuth2Credentials</strong></a>(<a href="oauth2client.client.html#Credentials">Credentials</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Credentials">Credentials</a>&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;for&nbsp;OAuth&nbsp;2.0<br>
&nbsp;<br>
<a href="#Credentials">Credentials</a>&nbsp;can&nbsp;be&nbsp;applied&nbsp;to&nbsp;an&nbsp;httplib2.Http&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;using&nbsp;the&nbsp;<a href="#OAuth2Credentials-authorize">authorize</a>()<br>
method,&nbsp;which&nbsp;then&nbsp;signs&nbsp;each&nbsp;request&nbsp;from&nbsp;that&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;the&nbsp;OAuth&nbsp;2.0<br>
access&nbsp;token.<br>
&nbsp;<br>
<a href="#OAuth2Credentials">OAuth2Credentials</a>&nbsp;objects&nbsp;may&nbsp;be&nbsp;safely&nbsp;pickled&nbsp;and&nbsp;unpickled.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a></dd>
<dd><a href="oauth2client.client.html#Credentials">Credentials</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="OAuth2Credentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim&nbsp;the&nbsp;state&nbsp;down&nbsp;to&nbsp;something&nbsp;that&nbsp;can&nbsp;be&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="OAuth2Credentials-__init__"><strong>__init__</strong></a>(self, access_token, client_id, client_secret, refresh_token, token_expiry, token_uri, user_agent)</dt><dd><tt>Create&nbsp;an&nbsp;instance&nbsp;of&nbsp;<a href="#OAuth2Credentials">OAuth2Credentials</a><br>
&nbsp;<br>
This&nbsp;constructor&nbsp;is&nbsp;not&nbsp;usually&nbsp;called&nbsp;by&nbsp;the&nbsp;user,&nbsp;instead<br>
<a href="#OAuth2Credentials">OAuth2Credentials</a>&nbsp;objects&nbsp;are&nbsp;instantiated&nbsp;by&nbsp;the&nbsp;<a href="#OAuth2WebServerFlow">OAuth2WebServerFlow</a>.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;token_uri:&nbsp;string,&nbsp;URI&nbsp;of&nbsp;token&nbsp;endpoint.<br>
&nbsp;&nbsp;client_id:&nbsp;string,&nbsp;client&nbsp;identifier.<br>
&nbsp;&nbsp;client_secret:&nbsp;string,&nbsp;client&nbsp;secret.<br>
&nbsp;&nbsp;access_token:&nbsp;string,&nbsp;access&nbsp;token.<br>
&nbsp;&nbsp;token_expiry:&nbsp;datetime,&nbsp;when&nbsp;the&nbsp;access_token&nbsp;expires.<br>
&nbsp;&nbsp;refresh_token:&nbsp;string,&nbsp;refresh&nbsp;token.<br>
&nbsp;&nbsp;user_agent:&nbsp;string,&nbsp;The&nbsp;HTTP&nbsp;User-Agent&nbsp;to&nbsp;provide&nbsp;for&nbsp;this&nbsp;application.<br>
&nbsp;<br>
&nbsp;<br>
Notes:<br>
&nbsp;&nbsp;store:&nbsp;callable,&nbsp;a&nbsp;callable&nbsp;that&nbsp;when&nbsp;passed&nbsp;a&nbsp;Credential<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;store&nbsp;the&nbsp;credential&nbsp;back&nbsp;to&nbsp;where&nbsp;it&nbsp;came&nbsp;from.<br>
&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;needed&nbsp;to&nbsp;store&nbsp;the&nbsp;latest&nbsp;access_token&nbsp;if&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;expired&nbsp;and&nbsp;been&nbsp;refreshed.</tt></dd></dl>

<dl><dt><a name="OAuth2Credentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute&nbsp;the&nbsp;state&nbsp;of&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;from&nbsp;being&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="OAuth2Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Authorize&nbsp;an&nbsp;httplib2.Http&nbsp;instance&nbsp;with&nbsp;these&nbsp;credentials.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;http:&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;something&nbsp;that&nbsp;acts&nbsp;like&nbsp;it.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;A&nbsp;modified&nbsp;instance&nbsp;of&nbsp;http&nbsp;that&nbsp;was&nbsp;passed&nbsp;in.<br>
&nbsp;<br>
Example:<br>
&nbsp;<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;httplib2.Http()<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;credentials.<a href="#OAuth2Credentials-authorize">authorize</a>(h)<br>
&nbsp;<br>
You&nbsp;can't&nbsp;create&nbsp;a&nbsp;new&nbsp;OAuth<br>
subclass&nbsp;of&nbsp;httplib2.Authenication&nbsp;because<br>
it&nbsp;never&nbsp;gets&nbsp;passed&nbsp;the&nbsp;absolute&nbsp;URI,&nbsp;which&nbsp;is<br>
needed&nbsp;for&nbsp;signing.&nbsp;So&nbsp;instead&nbsp;we&nbsp;have&nbsp;to&nbsp;overload<br>
'request'&nbsp;with&nbsp;a&nbsp;closure&nbsp;that&nbsp;adds&nbsp;in&nbsp;the<br>
Authorization&nbsp;header&nbsp;and&nbsp;then&nbsp;calls&nbsp;the&nbsp;original&nbsp;version<br>
of&nbsp;'request()'.</tt></dd></dl>

<dl><dt><a name="OAuth2Credentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set&nbsp;the&nbsp;storage&nbsp;for&nbsp;the&nbsp;credential.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;store:&nbsp;callable,&nbsp;a&nbsp;callable&nbsp;that&nbsp;when&nbsp;passed&nbsp;a&nbsp;Credential<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;store&nbsp;the&nbsp;credential&nbsp;back&nbsp;to&nbsp;where&nbsp;it&nbsp;came&nbsp;from.<br>
&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;needed&nbsp;to&nbsp;store&nbsp;the&nbsp;latest&nbsp;access_token&nbsp;if&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;expired&nbsp;and&nbsp;been&nbsp;refreshed.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>invalid</strong></dt>
<dd><tt>True&nbsp;if&nbsp;the&nbsp;credentials&nbsp;are&nbsp;invalid,&nbsp;such&nbsp;as&nbsp;being&nbsp;revoked.</tt></dd>
</dl>
<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Credentials">Credentials</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="OAuth2WebServerFlow">class <strong>OAuth2WebServerFlow</strong></a>(<a href="oauth2client.client.html#Flow">Flow</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Does&nbsp;the&nbsp;Web&nbsp;Server&nbsp;<a href="#Flow">Flow</a>&nbsp;for&nbsp;OAuth&nbsp;2.0.<br>
&nbsp;<br>
<a href="#OAuth2Credentials">OAuth2Credentials</a>&nbsp;objects&nbsp;may&nbsp;be&nbsp;safely&nbsp;pickled&nbsp;and&nbsp;unpickled.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.client.html#OAuth2WebServerFlow">OAuth2WebServerFlow</a></dd>
<dd><a href="oauth2client.client.html#Flow">Flow</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="OAuth2WebServerFlow-__init__"><strong>__init__</strong></a>(self, client_id, client_secret, scope, user_agent, auth_uri<font color="#909090">='https://accounts.google.com/o/oauth2/auth'</font>, token_uri<font color="#909090">='https://accounts.google.com/o/oauth2/token'</font>, **kwargs)</dt><dd><tt>Constructor&nbsp;for&nbsp;<a href="#OAuth2WebServerFlow">OAuth2WebServerFlow</a><br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;client_id:&nbsp;string,&nbsp;client&nbsp;identifier.<br>
&nbsp;&nbsp;client_secret:&nbsp;string&nbsp;client&nbsp;secret.<br>
&nbsp;&nbsp;scope:&nbsp;string,&nbsp;scope&nbsp;of&nbsp;the&nbsp;credentials&nbsp;being&nbsp;requested.<br>
&nbsp;&nbsp;user_agent:&nbsp;string,&nbsp;HTTP&nbsp;User-Agent&nbsp;to&nbsp;provide&nbsp;for&nbsp;this&nbsp;application.<br>
&nbsp;&nbsp;auth_uri:&nbsp;string,&nbsp;URI&nbsp;for&nbsp;authorization&nbsp;endpoint.&nbsp;For&nbsp;convenience<br>
&nbsp;&nbsp;&nbsp;&nbsp;defaults&nbsp;to&nbsp;Google's&nbsp;endpoints&nbsp;but&nbsp;any&nbsp;OAuth&nbsp;2.0&nbsp;provider&nbsp;can&nbsp;be&nbsp;used.<br>
&nbsp;&nbsp;token_uri:&nbsp;string,&nbsp;URI&nbsp;for&nbsp;token&nbsp;endpoint.&nbsp;For&nbsp;convenience<br>
&nbsp;&nbsp;&nbsp;&nbsp;defaults&nbsp;to&nbsp;Google's&nbsp;endpoints&nbsp;but&nbsp;any&nbsp;OAuth&nbsp;2.0&nbsp;provider&nbsp;can&nbsp;be&nbsp;used.<br>
&nbsp;&nbsp;**kwargs:&nbsp;dict,&nbsp;The&nbsp;keyword&nbsp;arguments&nbsp;are&nbsp;all&nbsp;optional&nbsp;and&nbsp;required<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters&nbsp;for&nbsp;the&nbsp;OAuth&nbsp;calls.</tt></dd></dl>

<dl><dt><a name="OAuth2WebServerFlow-step1_get_authorize_url"><strong>step1_get_authorize_url</strong></a>(self, redirect_uri<font color="#909090">='oob'</font>)</dt><dd><tt>Returns&nbsp;a&nbsp;URI&nbsp;to&nbsp;redirect&nbsp;to&nbsp;the&nbsp;provider.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;redirect_uri:&nbsp;string,&nbsp;Either&nbsp;the&nbsp;string&nbsp;'oob'&nbsp;for&nbsp;a&nbsp;non-web-based<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;application,&nbsp;or&nbsp;a&nbsp;URI&nbsp;that&nbsp;handles&nbsp;the&nbsp;callback&nbsp;from<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;authorization&nbsp;server.<br>
&nbsp;<br>
If&nbsp;redirect_uri&nbsp;is&nbsp;'oob'&nbsp;then&nbsp;pass&nbsp;in&nbsp;the<br>
generated&nbsp;verification&nbsp;code&nbsp;to&nbsp;step2_exchange,<br>
otherwise&nbsp;pass&nbsp;in&nbsp;the&nbsp;query&nbsp;parameters&nbsp;received<br>
at&nbsp;the&nbsp;callback&nbsp;uri&nbsp;to&nbsp;step2_exchange.</tt></dd></dl>

<dl><dt><a name="OAuth2WebServerFlow-step2_exchange"><strong>step2_exchange</strong></a>(self, code, http<font color="#909090">=None</font>)</dt><dd><tt>Exhanges&nbsp;a&nbsp;code&nbsp;for&nbsp;<a href="#OAuth2Credentials">OAuth2Credentials</a>.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;code:&nbsp;string&nbsp;or&nbsp;dict,&nbsp;either&nbsp;the&nbsp;code&nbsp;as&nbsp;a&nbsp;string,&nbsp;or&nbsp;a&nbsp;dictionary<br>
&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;the&nbsp;query&nbsp;parameters&nbsp;to&nbsp;the&nbsp;redirect_uri,&nbsp;which&nbsp;contains<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;code.<br>
&nbsp;&nbsp;http:&nbsp;httplib2.Http,&nbsp;optional&nbsp;http&nbsp;instance&nbsp;to&nbsp;use&nbsp;to&nbsp;do&nbsp;the&nbsp;fetch</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Flow">Flow</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Storage">class <strong>Storage</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Storage">Storage</a>&nbsp;objects.<br>
&nbsp;<br>
Store&nbsp;and&nbsp;retrieve&nbsp;a&nbsp;single&nbsp;credential.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Storage-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve&nbsp;credential.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;oauth2client.client.<a href="#Credentials">Credentials</a></tt></dd></dl>

<dl><dt><a name="Storage-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write&nbsp;a&nbsp;credential.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;credentials:&nbsp;<a href="#Credentials">Credentials</a>,&nbsp;the&nbsp;credentials&nbsp;to&nbsp;store.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">jcgregorio@google.com&nbsp;(Joe&nbsp;Gregorio)</td></tr></table>
</body></html>